<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>qnan</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="qinf.html" title="qinf" />
    <link rel="next" href="r2c.html" title="r2c" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">qnan</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="qinf.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="r2c.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="qnan"></a>
      <div class="titlepage"></div>
      <a id="IndexQnan" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">qnan</span>
        </h2>
        <p>qnan — 
      Questions whether the argument is a infinite number
    </p>
      </div>
      <div class="refsect1">
        <a id="idp140694672"></a>
        <h2>Description</h2>
        <p>
      Returns the number of times the argument is not a number.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp140696048"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>qnan</strong></span>(x) (no rate restriction)</pre>
      </div>
      <div class="refsect1">
        <a id="idp140754528"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the qnan opcode. It uses the file <a class="ulink" href="examples/qnan.csd" target="_top"><em class="citetitle">qnan.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp140756304"></a>
          <p class="title">
            <strong>Example 730. Example of the qnan opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
-+rtaudio=alsa -o dac:hw:0
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">ksmps</span> <span class="op">=</span> 400

<span class="omacro">#define</span> WII_B           #3#
<span class="omacro">#define</span> WII_A           #4#
<span class="omacro">#define</span> WII_R_A         #304#
<span class="omacro">#define</span> WII_PITCH       #20#
<span class="omacro">#define</span> WII_ROLL        #21#

gkcnt <span class="opc">init</span> 1

<span class="oblock">instr</span> 1  
  i1  wiiconnect 3,1

      wiirange   $WII_PITCH., <span class="op">-</span>20, 0
  kt  wiidata    $WII_B.
  ka  wiidata    $WII_A.
  kra wiidata    $WII_R_A.
  gka wiidata    $WII_PITCH.
  gkp wiidata    $WII_ROLL.
<span class="comment">; If the B (trigger) button is pressed then activate a note</span>
  <span class="octrl">if</span>  (kt<span class="op">==</span>0)    <span class="octrl">goto</span> ee
  <span class="octrl">if</span> (<span class="opc">qnan</span>(gka)) <span class="octrl">goto</span> ee
  <span class="octrl">if</span> (<span class="opc">qnan</span>(gkp)) <span class="octrl">goto</span> ee
  <span class="opc">event</span> "i", 2, 0, 5
  gkcnt <span class="op">=</span> gkcnt <span class="op">+</span> 1
  <span class="opc">printk2</span>  kb
<span class="oblock">endin</span>

<span class="oblock">instr</span> 2
  a1 <span class="opc">oscil</span>  <span class="opc">ampdbfs</span>(gka), 440<span class="op">+</span>gkp, 1
     <span class="opc">outs</span>   a1, a1
<span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">f</span>1 0 4096 10 1
<span class="stamnt">i</span>1 0 300

<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />

    </p>
      </div>
      <div class="refsect1">
        <a id="idp140760624"></a>
        <h2>Credits</h2>
        <p>Written by John ffitch.</p>
        <p>New in Csound 5.14</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="qinf.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="r2c.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">qinf </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> r2c</td>
        </tr>
      </table>
    </div>
  </body>
</html>
